const UserModel = require('../model/UserModel')

module.exports = {
  Query: {
    userList: () => UserModel.getUserList()
  },
  Mutation: {
    createUser: (parent, args) => {
      const user = new UserModel({ ...args }).create()
      return user
    },
    delUser: (parent, args) => {
      const user = UserModel.delUser(args.id)
      return user
    }
  }
}
